import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from './dashboard.component';
import { EyouleComponent } from './eyoule/eyoule.component';

const DashboardRoutes: Routes = [
  {
    path: '',
    component: DashboardComponent,
    data: { name: '菜谱', url: '' },
    children: [
      {
        path: '',
        component: EyouleComponent,
        data: { name: 'eyoule', url: '' },
      },
      {
        path: 'recipes',
        loadChildren: './recipes/recipes.module#RecipesModule'
      }
    ]
  }
];

@NgModule({
  imports: [
    RouterModule.forChild(DashboardRoutes)
  ],
  exports: [
    RouterModule
  ]
})

export class DashboardRoutingModule { }
